/**
 * Created by kenz on 2018/4/10.
 */
import { createStore, applyMiddleware } from 'redux'
import rootReducers from '../reducers'
import createLogger from 'redux-logger'

export default function configureStore(initialState) {
  const store = createStore(
    rootReducers,
    initialState,
    applyMiddleware(createLogger),
    window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
  )
  return store
}
